<%@page contentType="text/html;charset=UTF-8"%>
<div style="width: 970px;margin:0 auto;clear:both;position: relative;text-align: center;background-color:#f0f0f0;line-height: 25px;padding-top: 20px;">
	<span>南车株洲电力机车研究所有限公司 风电事业部</span>
	<div>All Rights Reserved Copyright © 2012 信息平台工作组</div>
</div>
<script>
	jQuery.extend({
	  getCookie : function(sName) {
	    var aCookie = document.cookie.split("; ");
	    for (var i=0; i < aCookie.length; i++){
	      var aCrumb = aCookie[i].split("=");
	      if (sName == aCrumb[0]) return decodeURIComponent(aCrumb[1]);
	    }
	    return '';
	  },
	  setCookie : function(sName, sValue, sExpires) {
	    var sCookie = sName + "=" + encodeURIComponent(sValue);
	    if (sExpires != null) sCookie += "; expires=" + sExpires;
	    document.cookie = sCookie;
	  },
	  removeCookie : function(sName) {
	    document.cookie = sName + "=; expires=Fri, 31 Dec 1999 23:59:59 GMT;";
	  }
	});
	setInterval(xxts, 20000);
	xxts();
	function xxts(){
		//$.removeCookie('tstime');
		var xxts_flag = false;
		if(h == ''){
			$.setCookie('tstime', new Date().getTime());
			xxts_flag = true;
		}else{
			var h = $.getCookie('tstime');
			var curt = new Date().getTime();
			var date3 = curt-h;
			var hours = Math.floor(date3/(3600*1000));
			if(hours >= 1){
				$.setCookie('tstime', new Date().getTime());
				xxts_flag = true;
			}
		}
		if(xxts_flag){
			$.getJSON('${ctx}/msgTips_searchCount.do?timestamp='+new Date().getTime(), function(result){
		    	var res = eval('('+result+')');
		        if(res > 0){
		        	xxtsDialog();
		        }
		    });
	    }
	}
	function xxtsDialog(){
	  $.dialog({ 
		    id: 'msg', 
		    title: '消息提示', 
		    content: 'url:${ctx}/msgTips_search.do?timestamp='+new Date().getTime(), 
		    max:false,
  			min:false,
		    width: 400, 
		    height: 200, 
		    left: '100%', 
		    top: '100%', 
		    fixed: true, 
		    drag: false, 
		    resize: false 
		});
	}
</script>